package com.platform.hjt.erp.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * ErpStorageFlowDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "erp_storage_flow_detail")
public class ErpStorageFlowDetail implements java.io.Serializable {
	// Fields

		/**
	 * 
	 */
	private static final long serialVersionUID = -8916902086454266689L;
		private String erpStorageFlowDetailId;
		private ErpGoodInfo erpGoodInfo;
		private ErpStorageFlow erpStorageFlow;
		private Double count;
		private Double price;
		private String remark;
		private String color;

		// Constructors

		/** default constructor */
		public ErpStorageFlowDetail() {
		}

		/** minimal constructor */
		public ErpStorageFlowDetail(String erpStorageFlowDetailId,
				ErpGoodInfo erpGoodInfo, ErpStorageFlow erpStorageFlow) {
			this.erpStorageFlowDetailId = erpStorageFlowDetailId;
			this.erpGoodInfo = erpGoodInfo;
			this.erpStorageFlow = erpStorageFlow;
		}

		/** full constructor */
		public ErpStorageFlowDetail(String erpStorageFlowDetailId,
				ErpGoodInfo erpGoodInfo, ErpStorageFlow erpStorageFlow,
				Double count, Double price, String remark, String color) {
			this.erpStorageFlowDetailId = erpStorageFlowDetailId;
			this.erpGoodInfo = erpGoodInfo;
			this.erpStorageFlow = erpStorageFlow;
			this.count = count;
			this.price = price;
			this.remark = remark;
			this.color = color;
		}

		// Property accessors
		@Id
		@GenericGenerator(name="systemUUID",strategy="uuid")
		@GeneratedValue(generator="systemUUID")
		@Column(name = "erp_storage_flow_detail_id", unique = true, nullable = false, length = 32)
		public String getErpStorageFlowDetailId() {
			return this.erpStorageFlowDetailId;
		}

		public void setErpStorageFlowDetailId(String erpStorageFlowDetailId) {
			this.erpStorageFlowDetailId = erpStorageFlowDetailId;
		}

		@ManyToOne(fetch = FetchType.LAZY)
		@JoinColumn(name = "erp_good_info_id", nullable = false)
		public ErpGoodInfo getErpGoodInfo() {
			return this.erpGoodInfo;
		}

		public void setErpGoodInfo(ErpGoodInfo erpGoodInfo) {
			this.erpGoodInfo = erpGoodInfo;
		}

		@ManyToOne(fetch = FetchType.LAZY)
		@JoinColumn(name = "storage_flow_id", nullable = false)
		public ErpStorageFlow getErpStorageFlow() {
			return this.erpStorageFlow;
		}

		public void setErpStorageFlow(ErpStorageFlow erpStorageFlow) {
			this.erpStorageFlow = erpStorageFlow;
		}

		@Column(name = "count", precision = 22, scale = 0)
		public Double getCount() {
			return this.count;
		}

		public void setCount(Double count) {
			this.count = count;
		}

		@Column(name = "price", precision = 22, scale = 0)
		public Double getPrice() {
			return this.price;
		}

		public void setPrice(Double price) {
			this.price = price;
		}

		@Column(name = "remark", length = 2000)
		public String getRemark() {
			return this.remark;
		}

		public void setRemark(String remark) {
			this.remark = remark;
		}

		@Column(name = "color", length = 50)
		public String getColor() {
			return this.color;
		}

		public void setColor(String color) {
			this.color = color;
		}

}